If one of the progress keys is set in a pull operation, a ::changed
signal is emitted on the progress object, and the callback for that
could query any of the progress keys — so they all need to be set,
otherwise we get an assertion failure in ostree_async_progress_get() due
to a named key not existing.
Spotted by Dan Nicholson in PR #819.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #835
Approved by: cgwalters
guint shift;
GString *buf = g_string_new ("");
+ /* Ensure the rest of the progress keys are set appropriately. */
+ update_progress (pull_data);
+
if (bytes_transferred < 1024)
shift = 1;
else